﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classes_introduce
{
    class Students
    {
        public string lastName;
        public string cridentials;
        public int gropeNumber;
        public int[] marks = new int [10];
        //public double avarageMarks;


        public void AddStudentsInfo()
        {
            Console.WriteLine("Enther the last name of student: ");
            lastName = Console.ReadLine();
            Console.WriteLine("Enther the cridentials of student: ");
            cridentials = Console.ReadLine();
            Console.WriteLine("Enther the number of grope: ");
            gropeNumber = Int32.Parse(Console.ReadLine());
        }

        public int[] AllMarks()
        {
            Console.WriteLine("Enther ten marks: ");
            for (int i = 0; i < marks.Length; i++)
            {
                marks[i] = Int32.Parse(Console.ReadLine());
            }
           
            return marks;
        }

        public double avarageOfAllMarks()
        {
            double sumOfMarks = 0;
            for (int i = 0; i < marks.Length; i++)
            {
                sumOfMarks += marks[i];
            }
            double avarageMarks = sumOfMarks / marks.Length;
            return avarageMarks;
        }
        


        public void StudentInfo()
        {
            Console.WriteLine("Student: ");
            Console.WriteLine("{0} {1} \nGrope number is - {2} \tAvarage mark is - {3}", lastName, cridentials, gropeNumber, avarageOfAllMarks());
        }
    }
}
